3.1.40 \(\int \sqrt {\sec (c+d x)} (b \sec (c+d x))^n (A+B \sec (c+d x)) \, dx\) [40]

3.1.40.1 Optimal result
3.1.40.2 Mathematica [A] (verified)
3.1.40.3 Rubi [A] (verified)
3.1.40.4 Maple [F]
3.1.40.5 Fricas [F]
3.1.40.6 Sympy [F]
3.1.40.7 Maxima [F]
3.1.40.8 Giac [F]
3.1.40.9 Mupad [F(-1)]

3.1.40.1 Optimal result

Integrand size = 31, antiderivative size = 163 \[ \int \sqrt {\sec (c+d x)} (b \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=-\frac {2 A \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (1-2 n),\frac {1}{4} (5-2 n),\cos ^2(c+d x)\right ) (b \sec (c+d x))^n \sin (c+d x)}{d (1-2 n) \sqrt {\sec (c+d x)} \sqrt {\sin ^2(c+d x)}}+\frac {2 B \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (-1-2 n),\frac {1}{4} (3-2 n),\cos ^2(c+d x)\right ) \sqrt {\sec (c+d x)} (b \sec (c+d x))^n \sin (c+d x)}{d (1+2 n) \sqrt {\sin ^2(c+d x)}} \]

output
-2*A*hypergeom([1/2, 1/4-1/2*n],[5/4-1/2*n],cos(d*x+c)^2)*(b*sec(d*x+c))^n 
*sin(d*x+c)/d/(1-2*n)/sec(d*x+c)^(1/2)/(sin(d*x+c)^2)^(1/2)+2*B*hypergeom( 
[1/2, -1/4-1/2*n],[3/4-1/2*n],cos(d*x+c)^2)*(b*sec(d*x+c))^n*sin(d*x+c)*se 
c(d*x+c)^(1/2)/d/(1+2*n)/(sin(d*x+c)^2)^(1/2)
 
3.1.40.2 Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 140, normalized size of antiderivative = 0.86 \[ \int \sqrt {\sec (c+d x)} (b \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=\frac {2 \csc (c+d x) (b \sec (c+d x))^n \left (A (3+2 n) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (1+2 n),\frac {1}{4} (5+2 n),\sec ^2(c+d x)\right )+B (1+2 n) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (3+2 n),\frac {1}{4} (7+2 n),\sec ^2(c+d x)\right ) \sec (c+d x)\right ) \sqrt {-\tan ^2(c+d x)}}{d (1+2 n) (3+2 n) \sqrt {\sec (c+d x)}} \]

input
Integrate[Sqrt[Sec[c + d*x]]*(b*Sec[c + d*x])^n*(A + B*Sec[c + d*x]),x]
 
output
(2*Csc[c + d*x]*(b*Sec[c + d*x])^n*(A*(3 + 2*n)*Hypergeometric2F1[1/2, (1 
+ 2*n)/4, (5 + 2*n)/4, Sec[c + d*x]^2] + B*(1 + 2*n)*Hypergeometric2F1[1/2 
, (3 + 2*n)/4, (7 + 2*n)/4, Sec[c + d*x]^2]*Sec[c + d*x])*Sqrt[-Tan[c + d* 
x]^2])/(d*(1 + 2*n)*(3 + 2*n)*Sqrt[Sec[c + d*x]])
 
3.1.40.3 Rubi [A] (verified)

Time = 0.52 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.03, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.226, Rules used = {2034, 3042, 4274, 3042, 4259, 3042, 3122}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \sqrt {\sec (c+d x)} (A+B \sec (c+d x)) (b \sec (c+d x))^n \, dx\)

\(\Big \downarrow \) 2034

\(\displaystyle \sec ^{-n}(c+d x) (b \sec (c+d x))^n \int \sec ^{n+\frac {1}{2}}(c+d x) (A+B \sec (c+d x))dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \sec ^{-n}(c+d x) (b \sec (c+d x))^n \int \csc \left (c+d x+\frac {\pi }{2}\right )^{n+\frac {1}{2}} \left (A+B \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx\)

\(\Big \downarrow \) 4274

\(\displaystyle \sec ^{-n}(c+d x) (b \sec (c+d x))^n \left (A \int \sec ^{n+\frac {1}{2}}(c+d x)dx+B \int \sec ^{n+\frac {3}{2}}(c+d x)dx\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle \sec ^{-n}(c+d x) (b \sec (c+d x))^n \left (A \int \csc \left (c+d x+\frac {\pi }{2}\right )^{n+\frac {1}{2}}dx+B \int \csc \left (c+d x+\frac {\pi }{2}\right )^{n+\frac {3}{2}}dx\right )\)

\(\Big \downarrow \) 4259

\(\displaystyle \sec ^{-n}(c+d x) (b \sec (c+d x))^n \left (A \cos ^{n+\frac {1}{2}}(c+d x) \sec ^{n+\frac {1}{2}}(c+d x) \int \cos ^{-n-\frac {1}{2}}(c+d x)dx+B \cos ^{n+\frac {1}{2}}(c+d x) \sec ^{n+\frac {1}{2}}(c+d x) \int \cos ^{-n-\frac {3}{2}}(c+d x)dx\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle \sec ^{-n}(c+d x) (b \sec (c+d x))^n \left (A \cos ^{n+\frac {1}{2}}(c+d x) \sec ^{n+\frac {1}{2}}(c+d x) \int \sin \left (c+d x+\frac {\pi }{2}\right )^{-n-\frac {1}{2}}dx+B \cos ^{n+\frac {1}{2}}(c+d x) \sec ^{n+\frac {1}{2}}(c+d x) \int \sin \left (c+d x+\frac {\pi }{2}\right )^{-n-\frac {3}{2}}dx\right )\)

\(\Big \downarrow \) 3122

\(\displaystyle \sec ^{-n}(c+d x) (b \sec (c+d x))^n \left (\frac {2 B \sin (c+d x) \sec ^{n+\frac {1}{2}}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (-2 n-1),\frac {1}{4} (3-2 n),\cos ^2(c+d x)\right )}{d (2 n+1) \sqrt {\sin ^2(c+d x)}}-\frac {2 A \sin (c+d x) \sec ^{n-\frac {1}{2}}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{4} (1-2 n),\frac {1}{4} (5-2 n),\cos ^2(c+d x)\right )}{d (1-2 n) \sqrt {\sin ^2(c+d x)}}\right )\)

input
Int[Sqrt[Sec[c + d*x]]*(b*Sec[c + d*x])^n*(A + B*Sec[c + d*x]),x]
 
output
((b*Sec[c + d*x])^n*((-2*A*Hypergeometric2F1[1/2, (1 - 2*n)/4, (5 - 2*n)/4 
, Cos[c + d*x]^2]*Sec[c + d*x]^(-1/2 + n)*Sin[c + d*x])/(d*(1 - 2*n)*Sqrt[ 
Sin[c + d*x]^2]) + (2*B*Hypergeometric2F1[1/2, (-1 - 2*n)/4, (3 - 2*n)/4, 
Cos[c + d*x]^2]*Sec[c + d*x]^(1/2 + n)*Sin[c + d*x])/(d*(1 + 2*n)*Sqrt[Sin 
[c + d*x]^2])))/Sec[c + d*x]^n
 

3.1.40.3.1 Defintions of rubi rules used

rule 2034
Int[(Fx_.)*((a_.)*(v_))^(m_)*((b_.)*(v_))^(n_), x_Symbol] :> Simp[b^IntPart 
[n]*((b*v)^FracPart[n]/(a^IntPart[n]*(a*v)^FracPart[n]))   Int[(a*v)^(m + n 
)*Fx, x], x] /; FreeQ[{a, b, m, n}, x] &&  !IntegerQ[m] &&  !IntegerQ[n] && 
  !IntegerQ[m + n]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3122
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( 
b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2 
F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n}, x] 
 &&  !IntegerQ[2*n]
 

rule 4259
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x] 
)^(n - 1)*((Sin[c + d*x]/b)^(n - 1)   Int[1/(Sin[c + d*x]/b)^n, x]), x] /; 
FreeQ[{b, c, d, n}, x] &&  !IntegerQ[n]
 

rule 4274
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + 
(a_)), x_Symbol] :> Simp[a   Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d   In 
t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
 
3.1.40.4 Maple [F]

\[\int \left (b \sec \left (d x +c \right )\right )^{n} \left (A +B \sec \left (d x +c \right )\right ) \sqrt {\sec \left (d x +c \right )}d x\]

input
int((b*sec(d*x+c))^n*(A+B*sec(d*x+c))*sec(d*x+c)^(1/2),x)
 
output
int((b*sec(d*x+c))^n*(A+B*sec(d*x+c))*sec(d*x+c)^(1/2),x)
 
3.1.40.5 Fricas [F]

\[ \int \sqrt {\sec (c+d x)} (b \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=\int { {\left (B \sec \left (d x + c\right ) + A\right )} \left (b \sec \left (d x + c\right )\right )^{n} \sqrt {\sec \left (d x + c\right )} \,d x } \]

input
integrate((b*sec(d*x+c))^n*(A+B*sec(d*x+c))*sec(d*x+c)^(1/2),x, algorithm= 
"fricas")
 
output
integral((B*sec(d*x + c) + A)*(b*sec(d*x + c))^n*sqrt(sec(d*x + c)), x)
 
3.1.40.6 Sympy [F]

\[ \int \sqrt {\sec (c+d x)} (b \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=\int \left (b \sec {\left (c + d x \right )}\right )^{n} \left (A + B \sec {\left (c + d x \right )}\right ) \sqrt {\sec {\left (c + d x \right )}}\, dx \]

input
integrate((b*sec(d*x+c))**n*(A+B*sec(d*x+c))*sec(d*x+c)**(1/2),x)
 
output
Integral((b*sec(c + d*x))**n*(A + B*sec(c + d*x))*sqrt(sec(c + d*x)), x)
 
3.1.40.7 Maxima [F]

\[ \int \sqrt {\sec (c+d x)} (b \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=\int { {\left (B \sec \left (d x + c\right ) + A\right )} \left (b \sec \left (d x + c\right )\right )^{n} \sqrt {\sec \left (d x + c\right )} \,d x } \]

input
integrate((b*sec(d*x+c))^n*(A+B*sec(d*x+c))*sec(d*x+c)^(1/2),x, algorithm= 
"maxima")
 
output
integrate((B*sec(d*x + c) + A)*(b*sec(d*x + c))^n*sqrt(sec(d*x + c)), x)
 
3.1.40.8 Giac [F]

\[ \int \sqrt {\sec (c+d x)} (b \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=\int { {\left (B \sec \left (d x + c\right ) + A\right )} \left (b \sec \left (d x + c\right )\right )^{n} \sqrt {\sec \left (d x + c\right )} \,d x } \]

input
integrate((b*sec(d*x+c))^n*(A+B*sec(d*x+c))*sec(d*x+c)^(1/2),x, algorithm= 
"giac")
 
output
integrate((B*sec(d*x + c) + A)*(b*sec(d*x + c))^n*sqrt(sec(d*x + c)), x)
 
3.1.40.9 Mupad [F(-1)]

Timed out. \[ \int \sqrt {\sec (c+d x)} (b \sec (c+d x))^n (A+B \sec (c+d x)) \, dx=\int \left (A+\frac {B}{\cos \left (c+d\,x\right )}\right )\,{\left (\frac {b}{\cos \left (c+d\,x\right )}\right )}^n\,\sqrt {\frac {1}{\cos \left (c+d\,x\right )}} \,d x \]

input
int((A + B/cos(c + d*x))*(b/cos(c + d*x))^n*(1/cos(c + d*x))^(1/2),x)
 
output
int((A + B/cos(c + d*x))*(b/cos(c + d*x))^n*(1/cos(c + d*x))^(1/2), x)